//
//  DAUserProfile.m
//  DAKnowledge
//
//  Created by DreamArts on 16/4/27.
//  Copyright © 2016年 lidongyang. All rights reserved.
//

#import "DAUserProfile.h"
#import "MJExtension.h"
@interface DAUserProfile ()
@property (nonatomic, strong) NSMutableArray *dataArray;
@end

@implementation DAUserProfile

/** 一键归档 解档*/
MJExtensionCodingImplementation

- (void)dataTransformModelWith:(NSDictionary *)dic{
    [DAUserProfile mj_setupReplacedKeyFromPropertyName:^NSDictionary *{
        return @{@"ID": @"id"};
    }];
    DAUserProfile *user  = [DAUserProfile mj_objectWithKeyValues:dic];
    /** 根据路径存到本地*/
    NSString *filePath = [NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES).lastObject stringByAppendingString:@"userProfile"];
      [NSKeyedArchiver archiveRootObject:user toFile:filePath];
}

@end
